<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">

	<ui:define name="content">
		<br/><br/><br/>
		<h:form>
			<div align="center">
			<h2>Change password</h2>
				<h:panelGrid columns="2"
				styleClass="inner-table login">

				<h:outputText value="New password:" />
				<h:inputSecret id="pass1" value="#{newPasswordController.pass1}"
					styleClass="inputText" required="true" maxlength="20"
					requiredMessage="The first password field cannot be empty!"/>
				<h:outputText value="Confirm Password:" />
				<h:inputSecret id="pass2" value="#{newPasswordController.pass2}"
					styleClass="inputText" required="true"
					requiredMessage="The second password field cannot be empty!!" 
					validatorMessage="Password must be between 4 and 20 characters">
					<f:validateLength minimum="4" maximum="20"/>
					</h:inputSecret>

			</h:panelGrid> <br></br>
			<h:commandButton value="Change Password"
				actionListener="#{newPasswordController.updateEmployee}"
				styleClass="button"></h:commandButton>
				<h:messages styleClass="errorMessage"></h:messages></div>
		</h:form>
		</ui:define>

</ui:composition>

</html>